


The Secant Method

by Bitenomnom



Series: Mathematical Proof [13]
Category: Sherlock (TV)
Genre: Developing Relationship, M/M, Mathematics, Past Relationship(s), Post-Reichenbach, Sherlock has textures
Language: English
Status: Completed
Published: 2012-09-26
Updated: 2012-09-26
Packaged: 2017-11-15 02:10:12
Rating: Mature
Warnings: Creator Chose Not To Use Archive Warnings
Chapters: 1
Words: 3,560
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/522016
Author URL: https://archiveofourown.org/users/Bitenomnom/pseuds/Bitenomnom
Summary: <blockquote class="userstuff">
              <p>It starts from Sherlock’s toes and from his hair.</p><p> 	“John,” Sherlock says, now lying on his back after a brief stint on his belly, and now it’s about his face. “John, check if anyone has posted anything on my website.” </p><p> 	John waits several seconds before responding, as if he’s been doing something very important and not daydreaming about writing a blog post detailing the various surfaces that lead to Sherlock’s hair being the messiest and the amount of tossing his head back against them that it took.</p>
            </blockquote>





	The Secant Method

**Author's Note:**

> The lack of story yesterday was due to my class for that day being cancelled. Today's kind of ran away with me -- it was supposed to be more math-centric, but then that sort of didn't happen. It was supposed to be pornier, but that also didn't happen. And I meant to go to bed an hour ago, and am rather tired, so I haven't the slightest idea if it's good or bad or what. @_@ Nonetheless, I hope you enjoy it.

When using various methods to estimate the root(s) of a polynomial, one must consider the various restrictions of the function. While Newton’s Method,

xn+1 = xn – f(xn)/f’(xn)

converges quadratically (very quickly), meaning that you don’t have to run through the algorithm many times to get a good estimate, it has certain limitations. For instance, Newton’s Method requires a derivative, which means that we have to do an extra calculation in making our estimate. We could instead approximate f’(xn) using Taylor’s Theorem, that is,

f(xn-1) = f(xn) + (xn-1 – xn)f’(xn) + …

Solving for f’(xn), you get what is actually the average rate of change between two points:

f’(xn) = (f(xn-1)-f(xn))/(xn-1 – xn)

You can then just replace this term in Newton’s Method, and get what is called the Secant Method:

xn+1 = xn – (f(xn)(xn-1 – xn))/(f(xn-1) – f(xn))

Visually, this equates to picking two points along the line of your function, and then drawing a straight line between them. Where that line crosses the x-axis is where you pick your next x value, xn+1, and then you look at the next straight line between that xn+1 and the xn (the value from the last time you did this), and so on, and so on, until your line comes very, very close to crossing the x-axis exactly where the function does. (We can pick out a maximum number of iterations we want to do, or a minimum amount of accuracy we want, to decide when to stop.)

([Here is a [not very fabulous] picture.](http://imageshack.us/a/img38/6899/secantmethod.jpg) You could probably Google “secant method” and get something better…)

Advantages of this method include the fact that there is only one function evaluation per iteration, that you don’t need the derivative of the function, and that while it doesn’t converge quite as quickly as Newton’s Method, which converges quadratically, the Secant Method does converge superlinearly (more than linear, less than quadratic). Its order of convergence is the Golden Ratio, (1+sqrt(5))/2. This method can be used to solve systems of equations. On the downside, it does require you to pick two initial guesses, rather than just one as with Newton’s Method, and it breaks down if two of your points have the same f(x) value for different x’s and your guesses end up on those two points. The points you pick, depending on the function, may have to be pretty close—otherwise you risk having a runaway, where your iterations don’t bring you any closer to finding the root and simply diverge to farther and farther off points.

***

            It starts with Sherlock’s toes—or maybe it’s his hair. Maybe it’s both. Yes: both.

            Because the thing about Sherlock’s toes is, right now they are extension of his dangling legs, slung over the arm of the sofa as they often are when Sherlock is Bored, Bored, Bored. They wriggle almost as if independently of one another, much more graceful than toes have any right to be, and much stranger, anyway; not sausage-nubs, but long, striking appendages, bent at odd angles like all the rest of Sherlock, like, _like_ , John thinks, most especially like his fingers.

            He has had a great deal of time to think about Sherlock’s toes. They are the nearest thing to him right now, with his chair currently almost at right angles to the sofa, reoriented last week because Sherlock needed space for urgent experiments involving paper planes. (John thought he was kidding—he wasn’t on a case, after all, that John knew of—but tried to join in, and Sherlock threw a fit when John’s simple little glider crashed with Sherlock’s more unusual design. “Now you’ve ruined it!” He’d sprinted after the thing. “I’ll never get that angle of bank again!” John, to further ruin the experiment, kicked over a few of the heads of broccoli Sherlock appeared to be sacrificing to the Experiment Gods by allowing them to play the important role of Miniature Trees, because there were his dinner plans for that evening gone.)

            Sherlock’s toes have been there, wriggling, currently bobbing as he bounces his feet to an imaginary tune that he seems to be playing on an imaginary violin (John doesn’t ask why he doesn’t just get the thing out and play it for real; given what half of Sherlock’s violin playing consists of when he’s bored, John isn’t sure he wants to hear it). He has been intermittently waving them about and holding them perfectly still and simply moving them, as if just discovering he had them, for the entire John has been in his chair, typing up about the 221B Aeroplane Crash Incident of 2012, having had nothing better to write about for well over a week and fans who are interested in that sort of thing (but not enough to actually read about it on Sherlock’s website, where the results of the experiment have been posted for days and include five different jabs at John for destroying various aspects of the experiment, generating wind currents, causing heat envelopes with his “constant meaningless chatter”).

            Meanwhile, Sherlock’s head has been bobbing along, and although it is farther from John’s view than the toes that are all but a quick, thoughtless turn to the side away from his face, it is still perfectly visible as John glances over his laptop screen. Sherlock’s loose curls sway along, sometimes falling away from the bulk of the hair and then getting pinned against it again when Sherlock sighs and turns onto his side or his stomach or whatever is the most dramatic position for him to take at that moment in time. His hair is always messy but never _messy_. John dreams of one day he could wake up and not spend five minutes trying to comb down that one lick of his own hair that tries to run away from his forehead at all costs. John dreams, sometimes, of what Sherlock would look like with _messy_ messy hair. He’s certain Sherlock actually does spend more time than he’d ever admit to tending to his hair to make it look just careless enough (the various products that occasionally appear in the downstairs shower, replenished regularly enough that they’re not just _for an experiment, John_ ), but what he wants to see isn’t Sherlock’s hair pre-product, per se, because he actually _has_ seen that, plenty of times, but more…well…more _debauched._ The sort of way that hair can only look after a particular type of physical exertion—not running, not jumping into rubbish bins for a piece of evidence, but mashed against a pillow or a wall or a body and ravished. His hair _has_ to feel nice, silky like the rest of him.

            It starts from Sherlock’s toes and from his hair.

            “John,” Sherlock says, now lying on his back after a brief stint on his belly, and now it’s about his _face_. “John, check if anyone has posted anything on my website.”

            John waits several seconds before responding, as if he’s been doing something very important and not daydreaming about writing a blog post detailing the various surfaces that lead to Sherlock’s hair being the messiest and the amount of tossing his head back against them that it took. Several seconds is, apparently, too long for Sherlock, and he reaches up and nudges John’s arm with his long, elegant, crooked toes. “Hang on,” John says, because he actually did just now remember that he hasn’t added the bit where Sherlock went out and bought animal-shaped biscuits to simulate wildlife amongst his broccoli forests. (“Sort these. You can eat all the lions,” Sherlock had said, shoving the box to John. “And the ambiguous equine creatures. I don’t need those.”)

            “ _John_.”

            John glances up, but doesn’t manage to catch himself before the first place his eyes land is the toes. Curved, like someone had spent too long yanking them all to one side and they stuck that way; his eyes stuck for just a moment longer than he should’ve gotten away with as he makes such ridiculous realizations as _Sherlock has toenails_ and _Sherlock’s toenails have a texture_.

            “ _John._ ”

            John’s eyes finally manage to leave his toes, lazily making their way up those too-damned-big feet, and Sherlock’s legs, bared to the knee by the combination of an open robe and loose pyjama pants that have worked their way up from ankles to thighs over the course of Sherlock’s squirming. John’s eyes stick again on the knees: stupid, sort of knobby things, but just as creamy-white as the rest of him. The thing about knees, John thinks, is that they are the gateway between two different worlds. Everyone sees everyone’s calves at some point—or—well—no one ought to be surprised to, anyway. Maybe it would have been odd if John’s eyes had landed instead on Sherlock’s calves, but it would have been _obscene_ if he had stared too long at his thighs. The knees were what separated them: just impersonal enough that they were okay to look at, just personal enough that it was odd to see them on display. If it had been a woman’s knees, it would be completely different, John thinks. He’d stare there and she’d _expect_ him to continue on up, whether the reasons were good or bad or neither.

            “My face is up here,” Sherlock finally says, and John flushes slightly at that: half because, yes, he was just caught staring at his flatmate’s knees, and half because, well, it started from Sherlock’s toes and hair but now it’s his face and his knees. His eyes are half-closed, lazy, bored, feigning disinterest in John’s probably-too-obvious interest. Or maybe he is that disinterested, John thinks—there’s no telling. Maybe John would have been embarrassed before, but they’re home, and either Sherlock doesn’t care one way or the other or he’d speak up if he was displeased (he always speaks up when he’s displeased), and John doubts his growing attraction to Sherlock was ever a secret. He’d ignored it up to about the instant Sherlock returned from being sodding _dead_ and something like sensory deprivation blew John’s eyes open to stupid things he’d pushed down just fine before, like the licentious curve of Sherlock’s lips and the little lines on his features that become prominent when he frowns or grins or, John imagines, when his brows knit together in small twitches for split seconds before his eyes roll backward into his skull and his neck stretches long to accommodate the burning column that shoots from his collarbone to his chest through his innards and outward in hot fluid when he comes.

            “Hm,” Sherlock says, and John checks to make sure his eyes are still open, that he wasn’t trying to experience it vicariously, head tilted back, eyes half shut… “What _are_ you thinking about?”

            “Knees,” John blurts. Close enough. Oh, Sherlock knows, and of course he does, and he probably always has, even before John wanted to acknowledge it. But he’d have done something by now, wouldn’t he have, if the interest were mutual? Instead he just lets John ogle him and twists about on the sofa playing fake violin.

            This earns a raised eyebrow, and John realizes why half a second later. “Not like…”

            “How, then?” Sherlock glances down at his own knees and uses one foot to shove the opposite leg of the pyjamas down, and then the other. John wonders if he’s self-conscious, or just teasing.

            “Just, you know.” Was it worth actually explaining? “The border between the personal and the impersonal, or something.”

            “You were staring at _my_ knees.”

            “I was.” _Obviously_ , he wants to say, but doesn’t.

            “Was it personal, or impersonal?”

            Well, at least he could serve as some form of entertainment to Sherlock, in this dire time of boredom. “Personal.”

            “Anything in particular about them?”

            “No, not really.” He pauses. “I was thinking about faces, too. Well. Yours.”

            “That does explain…” Sherlock trails off. John doesn’t ask him to finish the thought; he has a few good guesses as to what it is. “You know, John, it is surprisingly obvious when you’re thinking about sex.”

            “That bad, is it?”

            “Your eyes follow the path you would intend to take, your elbows rotate slightly outward, you hunch over a bit, and your toes generally either spread or curl—more difficult to tell when you’re wearing shoes. Similar to your anticipation of a high-stress situation except that you lick your lips more.”  
            John licks his lips and then mentally curses at himself for it. “All right, sure. You’ve got me.”

            “You also, on occasion, appear dazed, as though mentally playing through the situation in great detail. Physical movements and states of mind are highly linked—therefore, when you become particularly absorbed in such thoughts, you are able to experience them more vividly by moving through even just hints of the body language and movements that you would be experiencing in the real physical scenario.”

            True enough, now that he thinks about it. He blinks past the confusion that is fast arising at the fact that he is talking about sex with Sherlock and the world isn’t about to explode. And he seems so…receptive. It is almost like it’d be Sherlock’s version of… John runs a hand through his hair, scratching his scalp and inadvertently granting that stubborn lick of hair permission to spring out of place again. “Are you coming on to me?” He glances quickly down to his computer screen, afraid to see Sherlock’s eyeroll, his indignant huff, the imminent refusal.

            “I could be.”

            John’s gaze snaps up. Sherlock is wearing a sly smile.

            It started with his toes and his hair and went to his face and his knees, but John can only guess where it is going next.

            “You said something about knees,” Sherlock continues.

            John remains frozen. It was so—god. Oh. So—but…if he was offering what it sounds like he is… “Have you ever had sex before, Sherlock?”

            “Under some definitions of the word.” He shrugs, and it is clear he is trying to make it look nonchalant, but John can see from the crease of his mouth as he rearranges himself that it is a concerted effort to hide sudden self-consciousness. “But it seems rather _involved_ and _messy_ for the minimal payout of an orgasm, and there are typically various emotional requirements on top of that.”

            “But you want to…try it again?”

            “I believe so.”

            “You know I’m not exactly exempt from those ‘various emotional requirements’?”

            “Nor am I,” Sherlock says softly, curling his legs up.

            Oh— _oh._ And here John was thinking—

            John stands and walks toward Sherlock, toward his face, toward his solemn, earnest eyes, and drags his fingers up along his legs gently as he does, lifting them as they move just past Sherlock’s knees and then replacing them on his chest. He sits in the little area of the sofa cushion that Sherlock is not occupying, and leans down to press a kiss to his cheek.

            “I think you’re different, though,” Sherlock adds, when John simply remains there, face beside Sherlock’s.

            “How’s that?”

            “I’ve been observing you. You’re not just attracted to me, John; you love me.”

            John would have expected to hear words phrased that way to exit Sherlock’s mouth with the same tone as _obviously_ or _how didn’t you notice_ , plain as day, but instead they are soft, awed. “I hadn’t thought much about it,” John blurts, and Sherlock draws back, and so he quickly continues, “It’s just been so—I mean—do you think about the color of the sky?” God, maybe that sounds too maudlin. But that’s what it was: Maybe his feelings about Sherlock in relation to sex have changed over time, but there is no doubt he has always loved Sherlock in some way or another. Who would you shoot a man dead for, twenty-four hours after meeting him, but someone you love? John _had_ thought about that—back when it was a mystery to him, suddenly having his chest fill back up with warmth and a need to protect that met and then surpassed what it had been in Afghanistan.

            “That’s terrible,” Sherlock mutters. John traces a line from his cheek to his chest, slowly, as if Sherlock is a creature that is easily spooked.

            “Does it make sense?”

            “Perfectly.” Sherlock lays a hand against John’s and then lifts it back up to his face, to his lips, and kisses the palm like it’s a valuable discovery. His lips rove over it, and then kiss it again, and drag across, and kiss. “Inaccurate,” he says, “simply because in a non-metaphorical sense,” he wraps his lips around the skin between John’s thumb and forefinger, “the color of the sky is frequently important to consider and highly variable, and so I do spend plenty of time thinking about it. I expect you do, too.”

            “Maybe that’s better,” John agrees.

            “In a similarly inaccurate fashion,” Sherlock reaches for his other hand, “we may imagine, however incorrectly but merely for the sake of continuing the metaphor, that I don’t often ponder the greenness of grass.”

            John flushes, realizing the meaning of the statement. The hand that Sherlock isn’t holding, isn’t kissing and feeling and pressing, his latest experiment (but better, John hopes, or more durable, at least), moves down to rest against Sherlock’s belly, nudging his shirt up slightly for his hand to rest against the skin—soft, warm, god, exactly as smooth as it looked but better because now it has _dimension,_ muscle and fat and blood beneath it, all moving, constantly moving, every bit as active, John imagines, as Sherlock’s brain, for all that it is _only transport_. “Is this okay?” he asks. “Too fast?”

            “Reasonably paced.”  
            “Would you rather kiss something other than my hand?” John leans forward to make his meaning clear, still keeping his other hand against Sherlock’s stomach, and Sherlock quickly exchanges John’s palm for his lips.

            “I can see why you lick them so frequently,” Sherlock notes after a few moments, and then cautiously pokes his tongue through John’s lips. John, drawn into the moment, into the impossible feeling of Sherlock Holmes’ lips against his lips, tongue in his mouth, smooth belly beneath his warming hands, nips Sherlock’s tongue. Sherlock jumps, and yanks his head back, but when John smiles guiltily, apologetically, Sherlock smirks. “I see.” He narrows his eyes and adds, “Could be dangerous.”

            “Maybe we should discuss this a bit first,” John suggests before Sherlock can resume his attention to John’s mouth.

            “What is there to discuss?” John wonders if Sherlock recognizes the note of panic in his voice, as if John would be like whoever-else-had-done-this, leaving Sherlock without the sort of input John suspects Sherlock has only ever asked for once, today, simply using him and moving on.

            “The sorts of things people generally find it useful to discuss at the beginning of a relationship,” John specifies, and Sherlock beams, and John’s heart stutters as he realizes Sherlock may have initiated this expecting nothing of him, just hoping, even knowing John l—

            “Perhaps I should defer to your expertise,” Sherlock says, and John senses a bitten-back comment about his numerous failed relationships, bitten back possibly because Sherlock realizes he’s the reason most of them failed. “Still, I should…” his hands trail down to John’s trousers, and John places a hand against them to still them. “My understanding is that generally persons involved in relationships—”

            “Sod ‘should’ and ‘generally,’” John kisses Sherlock again, pulling against his lips with light suction. “This is about you and I, all right? Forget all your other—data points.” John rubs a thumb against Sherlock’s cheek. “You know what the best thing about fancying you is?” He doesn’t wait for Sherlock to respond. “I fancy _all_ of you. And right now, I really just fancy a nice, long snog, and then some dinner, and we can decide what else later.”

            Sherlock smiles, apparently pleased with the suggestion. Perahps “just a snog” is unfamiliar to him. “Right.”

            Because later, John is sure, later, tonight or tomorrow or next week or next month, he will trace more lines along Sherlock, with his hands and his eyes and his mouth, from Sherlock’s hair to his toes (his toes will wriggle around John’s tongue) and his toes to his face (his brow will twitch, will crease, as his lips part to allow a moan past) and his face to his knees (his knees will part slightly, too, as John sprawls his hand over them and then runs it downward, inward) and his knees to his chest (his chest will be flushed, will be sheeted with a thin layer of sweat, will heave and quiver) and his chest to his thighs (his thighs will be smooth and pale, sensitive and intimate and John will run his tongue along them, continuing where his hands left off at the knees, downward, inward) and his thighs to his hips (his hips will press up against John’s hands, will press up against John, will grind bony against him) and they will get there eventually, careful line by careful line.


End file.
